﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;
using ERDDiagram.ViewModel;

namespace ERDDiagram.Model
{
    public interface IDataService
    {
        void GetData(Action<DataItem, Exception> callback);

        ObservableCollection<EntityClass> GetEntities(Action<EntityClass, Exception> callback);
        ObservableCollection<EntityClass> GetEntitiesBySolution(Guid SolutionId, Action<EntityClass, Exception> callback);
        ObservableCollection<SolutionClass> GetSolutions(Action<SolutionClass, Exception> callback);
        EntityClass GetEntity(String EntityName, bool IncludeRelationships, String SchemaName, Action<EntityClass, Exception> callback);
        
        EntityClass GetEntityById(Guid entityId, Action<EntityClass, Exception> callback);

        String GetDiagramData(String DiagramID, Action<DataItem, Exception> callback);
        void SaveDiagramData(String DiagramID, String Data, Action<EntityClass, Exception> callback);
        String GetDefaultSolutionId();
        void DeleteEntity(String EntityID, Action<EntityClass, Exception> callback);
        void DeleteField(String entityName, String attribute, Action<EntityClass, Exception> callback);
    }
}
